﻿@model PH.Model.Schools.SchoolCollection
<input type="hidden" value="This is a Login Page">
<div class="ph-tabs">
    <ul>
        <li class="k-state-active">请选择一个学校</li>
    </ul>
    <div>
        <div>
            @foreach (var school in Model)
            {
                <button class="k-button" onclick="SetCurrentSchool('@school.Guid')">@school.SchoolName</button>
            }
        </div>
    </div>
</div>

<script>
    function SetCurrentSchool(guid) {
        Whale.Remote.Operation({
            url: "/School/SchoolInfo/SetCurrent/" + guid,
            success: function (result) {
                $("#cur_school").html(result.SchoolName);
                wndGeneralInformation.content(result.SchoolName+" 被设置为当前学校！").open();
            },
            error: function (msg) {
                wndGeneralInformation.content(msg).open();
            }
        });
    }
</script>

